package com.lqian.functional_intreface;

import java.util.function.Consumer;

public class ConsumerFunctionInterface {


    public static void main(String[] args) {
        Consumer<Double> con = money->{
            System.out.println("聚餐消费："+money);
        };
        happy(con,1000.3);

        happy(money->System.out.println("唱歌消费："+money),356.6);
        happy(money->System.out.println("洗脚消费："+money),1356.6);
        happy(money->System.out.println("洗脚消费："+money),1356.6);
    }


    public static void happy(Consumer<Double> con,double money){
        con.accept(money);
    }
}
